package com.youxin.admin.auth.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.youxin.admin.auth.model.Menu;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MenuMapper extends BaseMapper<Menu> {
    public List<Menu> selectMenuByAuthorityId(@Param("authorityId") String authorityId);

    /**
     * 根据用户和组的权限关系查找用户可访问菜单
     * @param userId
     * @return
     */
    public List<Menu> selectAuthorityMenuByUserId(@Param("userId") int userId);

    /**
     * 根据用户和组的权限关系查找用户可访问的系统
     * @param userId
     * @return
     */
    public List<Menu> selectAuthoritySystemByUserId(@Param("userId") int userId);

    List<Menu>  selectAllAuthority();
    public List<Menu> getAuthorityMenuByMenuId(@Param("userId") String userId, @Param("menuId") String menuId);

    public List<Menu> selectAllMenuPermissions();
    public List<Menu> selectAuthorityMenuListByUserId(@Param("userId") String userId);

    List<Menu> findMenusByUserName(@Param("userName") String userName);

    List<Menu> getUserMenuByUserId(@Param("userId") String userId, @Param("menuId") String menuId);
}
